<?php
header("content-type:text/html;charset=utf-8");
mysql_connect("localhost","root","root");
mysql_select_db("hotel");
$id=$_POST["id"];
$sql="select * from user where userId= $id;";
$res=mysql_query($sql);
$row=mysql_fetch_assoc($res);
print_r(json_encode($row));
?>